import service from "../request.js";

// 获取权限树
function getPermission(){
    return service({
        method:"get",
        url:'/sys/permission'
    })
}

// 获取权限集合
function getPerm(){
    return service({
        method:"get",
        url:'/sys/permission/perm'
    })
}


// 根据权限id获取这个权限对象
function getPermById(id){
    return service({
        method:"get",
        url:`/sys/permission/perm/${id}`
    })
}

// 启动禁用权限
function getPermStatus(id,permStatus){
    return service({
        method:"put",
        url:`/sys/permission/${id}/${permStatus}`
    })
}




export { getPermission,getPerm,getPermById,getPermStatus }